void createWtSyst() {

	gROOT->SetMacroPath("/afs/atlas.umich.edu/home/lailinxu/data18a/CommonTool/atlas_plot_style/atlasstyle-00-03-01");
    gROOT->LoadMacro("AtlasStyle.C");
    gROOT->ProcessLine("SetAtlasStyle()");

    TCanvas *MyC = new TCanvas("MyC", "MyC", 800, 600);
    gStyle->SetPadLeftMargin(0.15);
    gStyle->SetPadRightMargin(0.10);
    gStyle->SetPadTopMargin(0.05);
    gStyle->SetPadBottomMargin(0.15);
    MyC->SetTicks(1,1);

    gStyle->SetOptStat(0);

	TFile *f1 = new TFile("Truth_incl_4Lep_ZZPt.root");

	TH1F* hPDF = (TH1F*) f1->Get("PDF_RATIO");

	TH1F* hSyst = (TH1F*) hPDF->Clone();

	TFile *f2 = new TFile("JHU_HPt_reweighting_syst.root", "RECREATE");
	f2->cd();
	hSyst->SetTitle("JHU_HPt_reweighting_Syst");
	hSyst->SetName("JHU_HPt_reweighting_Syst");


	hSyst->GetXaxis()->SetRangeUser(0, 200);
	hSyst->GetYaxis()->SetRangeUser(0, 1);
	hSyst->GetXaxis()->SetTitle("p_{T}^{H} [GeV]");
	hSyst->GetYaxis()->SetTitle("syst");
	hSyst->SetLineColor(6);
	hSyst->SetMarkerColor(6);
	hSyst->SetMarkerSize(0.5);
	hSyst->Draw("same,hist");
	

    TLegend *lg = new TLegend(0.5, 0.7, 0.72, 0.9);
    lg->SetFillColor(10);
    lg->SetBorderSize(0);
    lg->AddEntry(hSystPDF, "PDF", "pl");
    lg->AddEntry(hSystScale, "Scale", "pl");
    lg->AddEntry(hSyst, "Total", "pl");
    lg->Draw();

	// Draw Text (ATLAS )(Part1)
    double atlx1 = 0.17;
    double atly1 = 0.85;
    TPaveText* ta = new TPaveText(atlx1,atly1,atlx1+0.05,atly1+0.08,"NDC");
    ta->SetBorderSize(0);
    ta->SetFillColor(10);
    ta->SetTextColor(1);
    ta->SetTextSize(0.05);
    ta->SetTextAlign(12);
    ta->SetTextFont(72);
    ta->AddText("ATLAS");
    ta->Draw();

    // Draw Text (ATLAS )(Part2)
    double atlx2 = atlx1+0.14;
    double atly2 = atly1;
    TPaveText* ta2 = new TPaveText(atlx2,atly2,atlx2+0.10,atly2+0.08,"NDC");
    ta2->SetBorderSize(0);
    ta2->SetFillColor(10);
    ta2->SetTextColor(1);
    ta2->SetTextSize(0.05);
    ta2->SetTextAlign(22);
	//ta2->SetTextFont(72);
    ta2->AddText("Internal");
    ta2->Draw();

    // Draw Text (ATLAS)
    double sqrtx1 = 0.17;
    double sqrty1 = 0.78;
    TPaveText* ta1 = new TPaveText(sqrtx1,sqrty1,sqrtx1+0.2,sqrty1+0.08,"NDC");
    ta1->SetBorderSize(0);
    ta1->SetFillColor(10);
    ta1->SetTextColor(1);
    ta1->SetTextSize(0.05);
    ta1->SetTextAlign(12);
    ta1->AddText("#sqrt{s} = 8 TeV");
    ta1->Draw();
	
	MyC->SaveAs("syst.png");
	MyC->SaveAs("syst.eps");
	MyC->SaveAs("syst.pdf");

	hSyst->Write();

	f2->Write();
	f2->Close();
	
	f1->Close();

}
